Note: This tutorial assumes that you have completed and understood the tutorial: SimulatingOneRobot. |
Please ask about problems and questions regarding this tutorial on answers.ros.org. Don't forget to include in your question the link to this page, the versions of your OS & ROS, and also add appropriate tags. |
Running a twoLevelMTTD simulation in ROS (using stageros)
Description: This tutorial allows and explain how to simulate (and use) the twoLevelMTTD OROCOS components using MTTD_interface for ROS.Tutorial Level: INTERMEDIATE
Contents
Overview
This tutorial propose to run the twoLevelMTTD on a generic mobile platform, simulated in stage (stageros). The robot knows the environment's map and it's able to navigate (using the Navigation Stack). The setup described is available on MTTD_simulation package. This scenario allows to show how use the twoLevelMTTD, in order to detect people (or unknown objects) in the environment.
Running
First of all, check if the MTTD_interface is present and compiled
rosmake MTTD_interface
Then, type
./runMTTD
inside the MTTD_interface folder, in order to execute a bash script that launch our simulation. Using another terminal, type
./runXML
to run an OROCOS node contains twoLevelMTTD algorithm. In alternative, it's possible to launch everything from the same terminal just typing
roslaunch MTTD_interface MTTD_interface.launch
You should see rviz and a stageros window. The initial pose is not set yet: typing in another terminal
rosrun MTTD_simulation initial_sender
in order to set the robot initial pose. When the robot appear in the correct location, please terminate initial_sender node. (You can check rviz and stageros, the robot should appear in the same pose in both) Then, it's possible to move the robot inside the simulated environment, using rviz. The twoLevelMTTD core is not running yet; to activate it, typing on OROCOS TaskBrowser
twoLevelMTTD.start